import test from "./components/test/test";
import MapContainer from "./components/map/MapContainer";
import EditArea from "./tool/edit/EditArea";
import StateManager from "./tool/edit/StateManager";
import Graffiti from "./tool/edit/Graffiti";
import DrawArea from "./tool/edit/DrawArea";
import ClickEdit from "./tool/edit/ClickEdit";
import SelectPolygon from "./tool/edit/SelectPolygon";
import LongTouch from "./tool/longTouch/LongTouch";
import Touch from "./tool/touch/Touch";
import MapCommon from "./common/MapCommon";
import MiniMap from "./components/control/MiniMap";
import DrawAreaControl from "./tool/control/DrawAreaControl";
import  "./assets/index.less";
import  "./assets/iconfont.css";

const components = [
  test,MapContainer
  // ...如果还有的话继续添加
]

const install = function (Vue, opts = {}) {
  components.map(component => {
    Vue.component(component.name, component);
  })
}

/* 支持使用标签的方式引入 */
if (typeof window !== 'undefined' && window.Vue) {
  install.use(window.Vue);
}

export  {
  //总体
  install,
  //支持按需引入
  test,
  EditArea,
  MapContainer,
  MapCommon,
  LongTouch,
  StateManager,
  Graffiti,
  SelectPolygon,
  DrawArea,
  ClickEdit,
  MiniMap,
  DrawAreaControl,
  Touch
}


